import { cloneNode } from '@babel/types';
import { Tabs, WhiteSpace, Badge } from 'antd-mobile';
import React from 'react';
import { Route, withRouter, Link } from 'react-router-dom';
const tabs = [
    {
        title: '首页', key: 't1', page: '/home'
    },
    { title: '栏目', key: 't2', page: '/follow' },
    { title: '关注', key: 't3', page: '/column' },
];

class NavTabs extends React.Component {
    render() {
        return (
            <div>
                <WhiteSpace style={{ marginTop: '30px', display: 'inline-block' }} />
                <div>
                    <Tabs tabs={tabs}
                        initialPage={Tabs.key}
                        onChange={(item, index) => {
                            this.props.history.push(item.page)
                        }}
                    />
                </div>
            </div >
        )
    }
}

export default withRouter(NavTabs)